package com.fount4j.generator;

import com.fount4j.generator.context.GeneratorContext;
import com.fount4j.generator.context.YmlGeneratorContext;
import com.fount4j.generator.introspector.Generator;

/**
 * 生成文件
 *
 * @author Morven 2016/12/21
 */
public class GenerateFiles {

    public static void main(String[] args) {
        GeneratorContext context;
        if (args != null && args.length > 0) {
            context = new YmlGeneratorContext(args[0]);
        } else {
            context = new YmlGeneratorContext("./assets/generator.yml");
        }
        Generator generator = new Generator(context);
        generator.generate();
    }
}
